package androidx.core.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ProgressBar;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class ContentLoadingProgressBar extends ProgressBar {
    private final Runnable ʼ;
    boolean ˊ;
    boolean ˋ;
    long ˎ;
    boolean ˏ;
    private final Runnable ॱ;

    public ContentLoadingProgressBar(@NonNull Context context) {
        this(context, null);
    }

    public ContentLoadingProgressBar(@NonNull Context context, @Nullable AttributeSet attributeSet) {
        super(context, attributeSet, 0);
        this.ˎ = -1;
        this.ˏ = false;
        this.ˊ = false;
        this.ˋ = false;
        this.ॱ = new Runnable(this) {
            final /* synthetic */ ContentLoadingProgressBar ˏ;

            {
                this.ˏ = r1;
            }

            public void run() {
                this.ˏ.ˏ = false;
                this.ˏ.ˎ = -1;
                this.ˏ.setVisibility(8);
            }
        };
        this.ʼ = new Runnable(this) {
            final /* synthetic */ ContentLoadingProgressBar ˊ;

            {
                this.ˊ = r1;
            }

            public void run() {
                this.ˊ.ˊ = false;
                if (!this.ˊ.ˋ) {
                    this.ˊ.ˎ = System.currentTimeMillis();
                    this.ˊ.setVisibility(0);
                }
            }
        };
    }

    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        ˊ();
    }

    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        ˊ();
    }

    private void ˊ() {
        removeCallbacks(this.ॱ);
        removeCallbacks(this.ʼ);
    }
}
